package com.founder.chd_daily_query.entity.query;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;

import javax.persistence.*;
import java.util.Date;
import java.util.Objects;

@Entity
@Table(name = "LAND_COAL_TOFACTORY", schema = "RBD_RESULT", catalog = "")
public class LandCoalTofactoryEntity {
    private String idbatch;
    private Long recquan;
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    @JSONField(format = "yyyy-MM-dd")
    private Date arrivedate;
    private Long sendcount;
    private String coalAttributeId;
    private String qnet;
    private Long naturalCoalUnitprice;
    private Long standardCoalUnitprice;
    private String idMain;
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    @JSONField(format = "yyyy-MM-dd")
    private Date createDate;
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    @JSONField(format = "yyyy-MM-dd")
    private Date lastUpdateDate;
    private String powerstationId;

    @Basic
    @Column(name = "IDBATCH")
    public String getIdbatch() {
        return idbatch;
    }

    public void setIdbatch(String idbatch) {
        this.idbatch = idbatch;
    }

    @Basic
    @Column(name = "RECQUAN")
    public Long getRecquan() {
        return recquan;
    }

    public void setRecquan(Long recquan) {
        this.recquan = recquan;
    }

    @Basic
    @Column(name = "ARRIVEDATE")
    public Date getArrivedate() {
        return arrivedate;
    }

    public void setArrivedate(Date arrivedate) {
        this.arrivedate = arrivedate;
    }

    @Basic
    @Column(name = "SENDCOUNT")
    public Long getSendcount() {
        return sendcount;
    }

    public void setSendcount(Long sendcount) {
        this.sendcount = sendcount;
    }

    @Basic
    @Column(name = "COAL_ATTRIBUTE_ID")
    public String getCoalAttributeId() {
        return coalAttributeId;
    }

    public void setCoalAttributeId(String coalAttributeId) {
        this.coalAttributeId = coalAttributeId;
    }

    @Basic
    @Column(name = "QNET")
    public String getQnet() {
        return qnet;
    }

    public void setQnet(String qnet) {
        this.qnet = qnet;
    }

    @Basic
    @Column(name = "NATURAL_COAL_UNITPRICE")
    public Long getNaturalCoalUnitprice() {
        return naturalCoalUnitprice;
    }

    public void setNaturalCoalUnitprice(Long naturalCoalUnitprice) {
        this.naturalCoalUnitprice = naturalCoalUnitprice;
    }

    @Basic
    @Column(name = "STANDARD_COAL_UNITPRICE")
    public Long getStandardCoalUnitprice() {
        return standardCoalUnitprice;
    }

    public void setStandardCoalUnitprice(Long standardCoalUnitprice) {
        this.standardCoalUnitprice = standardCoalUnitprice;
    }

    @Id
    @Column(name = "ID_MAIN")
    public String getIdMain() {
        return idMain;
    }

    public void setIdMain(String idMain) {
        this.idMain = idMain;
    }

    @Basic
    @Column(name = "CREATE_DATE")
    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    @Basic
    @Column(name = "LAST_UPDATE_DATE")
    public Date getLastUpdateDate() {
        return lastUpdateDate;
    }

    public void setLastUpdateDate(Date lastUpdateDate) {
        this.lastUpdateDate = lastUpdateDate;
    }

    @Basic
    @Column(name = "POWERSTATION_ID")
    public String getPowerstationId() {
        return powerstationId;
    }

    public void setPowerstationId(String powerstationId) {
        this.powerstationId = powerstationId;
    }

    @Override
    public String toString() {
        return "LandCoalTofactoryEntity{" +
                "idbatch='" + idbatch + '\'' +
                ", recquan=" + recquan +
                ", arrivedate=" + arrivedate +
                ", sendcount=" + sendcount +
                ", coalAttributeId='" + coalAttributeId + '\'' +
                ", qnet='" + qnet + '\'' +
                ", naturalCoalUnitprice=" + naturalCoalUnitprice +
                ", standardCoalUnitprice=" + standardCoalUnitprice +
                ", idMain='" + idMain + '\'' +
                ", createDate=" + createDate +
                ", lastUpdateDate=" + lastUpdateDate +
                ", powerstationId='" + powerstationId + '\'' +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        LandCoalTofactoryEntity that = (LandCoalTofactoryEntity) o;
        return Objects.equals(idbatch, that.idbatch) &&
                Objects.equals(recquan, that.recquan) &&
                Objects.equals(arrivedate, that.arrivedate) &&
                Objects.equals(sendcount, that.sendcount) &&
                Objects.equals(coalAttributeId, that.coalAttributeId) &&
                Objects.equals(qnet, that.qnet) &&
                Objects.equals(naturalCoalUnitprice, that.naturalCoalUnitprice) &&
                Objects.equals(standardCoalUnitprice, that.standardCoalUnitprice) &&
                Objects.equals(idMain, that.idMain) &&
                Objects.equals(createDate, that.createDate) &&
                Objects.equals(lastUpdateDate, that.lastUpdateDate) &&
                Objects.equals(powerstationId, that.powerstationId);
    }

    @Override
    public int hashCode() {

        return Objects.hash(idbatch, recquan, arrivedate, sendcount, coalAttributeId, qnet, naturalCoalUnitprice, standardCoalUnitprice, idMain, createDate, lastUpdateDate, powerstationId);
    }
}
